<template>
  <div>
    <el-dialog
      title="新建员工"
      :visible.sync="dialogshow"
      :before-close="dialogClose"
      style="display: none"
      :fullscreen="fullscreen"
    >
      <dialog-tools
        v-bind:back="true"
        v-bind:next="true"
        v-bind:goback="true"
        v-bind:prev="true"
        v-bind:screen="true"
        @clickfullscreen="clickfullscreen"
      >
      </dialog-tools>
      <div>
        <!-- <el-form-item label="订单号" prop="field108">
            <el-input
              v-model="formData.address"
              auto-complete="off"
              @click.native="handleButtons(33)"
            ></el-input>
          </el-form-item>
          <el-form-item label="款号" prop="field108">
            <el-input
              v-model="formData.address"
              auto-complete="off"
            ></el-input>
          </el-form-item>

      <el-form-item label="报价项目" prop="field108">    
  <el-select v-model="bjxm" placeholder="请选择" style="width:100%">
    <el-option label="设计费" value="1"></el-option>
    <el-option label="取版费" value="2"></el-option>
    <el-option label="证书费" value="3"></el-option>
    <el-option label="其它" value="4"></el-option>
  </el-select>
</el-form-item>

          <el-form-item label="报价金额" prop="field108">
            <el-input
              v-model="formData.customercode"
              auto-complete="off"
            ></el-input>
          </el-form-item>
          
             <el-form-item label="备注">
            <el-input type="textarea"
              v-model="formData.customercode"
              auto-complete="off"
            ></el-input>
          </el-form-item>        -->
        <el-form
          ref="elForm"
          :model="formData"
          
          size="medium"
          label-width="100px"
        >
        <el-row class="item-w300">
          <!-- <el-form-item label="头像">
            <img
              src="./statics/images/head.png"
              width="50"
              height="50"
              alt=""
            />
          </el-form-item> -->
          <el-form-item label="姓名" prop="name" :required="true">
            
            <el-input
              v-model="formData.name"
              auto-complete="off"
              class="clientName"
            ></el-input>
          </el-form-item>

          <el-form-item label="电话" prop="tel" :required="true">
            <el-input
              v-model="formData.tel"
              auto-complete="off"
              class="clientName"
            ></el-input>
          </el-form-item>

          <el-form-item label="登陆密码" prop="password" :required="true">
            <el-input
              v-model="formData.tel"
              auto-complete="off"
              class="clientName"
            ></el-input>
          </el-form-item>
        </el-row>
          <el-row class="item-w300">
          <el-form-item label="工号" :required="true">
            <el-input
              v-model="formData.gonghao"
              auto-complete="off"
            ></el-input>
          </el-form-item>
          <el-form-item label="卡号" >
            <el-input
              v-model="formData.kahao"
              auto-complete="off"
            ></el-input>
          </el-form-item>
          <el-form-item label="身份证号">
            <el-input v-model="formData.sfz_id" auto-complete="off"></el-input>
          </el-form-item>
        </el-row>
          <el-row class="item-w300">


          <el-form-item label="是否在职">
 <el-checkbox label="是" v-model="formData.is_zaizhi"></el-checkbox>
          </el-form-item>
          <el-form-item label="系统使用">
 <el-radio-group v-model="formData.is_disable">
    <el-radio :label="0">正常</el-radio>
    <el-radio :label="1">禁用</el-radio>
 </el-radio-group>
  </el-form-item>

          <el-form-item label="性别">
             <el-select v-model="formData.six" placeholder="性别">
                <el-option label="男" value="1"></el-option>
                <el-option label="女" value="2"></el-option>
                <el-option label="未知" value="3"></el-option>
             </el-select>
          </el-form-item>

        </el-row>
          <el-row class="item-w300">



          <el-form-item label="部门">
                <el-select v-model="formData.bumen" placeholder="部门">
      <el-option label="销售部" value="1"></el-option>
      <el-option label="财务部" value="2"></el-option>
            <el-option label="设计部" value="3"></el-option>
      <el-option label="生产部" value="4"></el-option>
            <el-option label="采购部" value="5"></el-option>
      <el-option label="人事行政部" value="6"></el-option>
    </el-select>
            
          </el-form-item>

          <el-form-item label="岗位" >
                <el-select v-model="formData.ganwei" multiple placeholder="岗位">
      <el-option label="销售" value="1"></el-option>
      <el-option label="采购" value="2"></el-option>
            <el-option label="财务" value="3"></el-option>
      <el-option label="仓管" value="4"></el-option>
            <el-option label="质检" value="5"></el-option>
      <el-option label="人事" value="6"></el-option>
      <el-option label="老板" value="6"></el-option>
      <el-option label="普通员工" value="6"></el-option>
    </el-select>

          </el-form-item>
          <el-form-item label="角色">

<el-select v-model="formData.role" multiple placeholder="角色">
      <el-option label="超级管理员" value="1"></el-option>
      <el-option label="普通员工" value="2"></el-option>
      <el-option label="离职员工" value="3"></el-option>
      <el-option label="仓库品检" value="4"></el-option>
      <el-option label="人事" value="5"></el-option>
    </el-select>
            
          </el-form-item>

          </el-row>
          <el-row>
          <el-form-item label="备注">
            <el-input 
            type="textarea"
            v-model="formData.memo" auto-complete="off"></el-input>
          </el-form-item>
          </el-row>
        </el-form>
      </div>
      <div slot="footer" class="dialog-footer">
        <!-- <el-button @click="resetForm" style="float:left;margin-left:20px;">查看款号详情</el-button> -->
        <el-button @click="resetForm">重置</el-button>
        <el-button @click="dialogClose">取 消</el-button>
        <el-button type="primary" @click="alertopen">确定</el-button>
      </div>
    </el-dialog>
    <!-- <dialog-search-order
      v-bind:dialogshow="dialogSearchOrder"
      @dialog_close="dialogSearchOrder = !dialogSearchOrder"
    ></dialog-search-order> -->
  </div>
</template>
<style scoped>
</style>

<script>
module.exports = {
  methods: {
    dialogAdd() {
      console.log(123);
    },
    dialogClose() {
      this.$emit("dialog_close", 1);
    },
    clickfullscreen() {
      this.fullscreen = !this.fullscreen;
    },
    submitForm() {
      this.$refs["elForm"].validate((valid) => {
        if (!valid) return;
        // TODO 提交表单
      });
    },
    resetForm() {
      this.$refs["elForm"].resetFields();
    },
    alertopen() {
      this.$confirm("是否继续操作?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消",
          });
        });
    },
  },
  props: ["dialogshow"],
  data() {
    return {
      formData: {
        name: null,
        tel:null,
        gonghao: null,
        kahao: null,
        six: null,
        zhiwu:null,
        is_zaizhi: null,
        is_disable:1,
        ruzhi_time: null,
        lizhi_time: null,
        tel: null,
        address: null,
        ganwei: null,
        ganweijb: null,
        bumen: null,
        bangzu: null,
        role:null,
      },

     
      fullscreen: false,
      Sendmssages: {
        address: "",
        customercate: "",
        cate: "",
        nickname: "",
        creditrank: "",
        name: "",
      },
    

    };
  },
  components: {
    "dialog-tools": "url:../tools/dialog-tools.vue",
    "dialog-search-order": "url:./search-order.vue",
  },
};
</script>
